Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store/tikv: remove use of fastrand #22543

Merged
merged 4 commits into from
Jan 27, 2021
Merged

store/tikv: remove use of fastrand #22543

merged 4 commits into from
Jan 27, 2021

Conversation

disksing
Copy link
Contributor

Signed-off-by: disksing i@disksing.com

What problem does this PR solve?

Resolve dependency on fastrand.
Part of #22513

What is changed and how it works?

What's Changed:
Use math/rand instead.

Check List

Tests

  • Unit test

Release note

  • No release note

Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
Copy link
Contributor

@AndreMouche AndreMouche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it affect the performance? Rest LGTM

@@ -213,7 +212,7 @@ func newTikvStore(uuid string, pdClient pd.Client, spkv SafePointKV, client Clie
safePoint: 0,
spTime: time.Now(),
closed: make(chan struct{}),
replicaReadSeed: fastrand.Uint32(),
replicaReadSeed: rand.Uint32(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it affect the performance?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forget it, it is not used so frequently

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Jan 27, 2021
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Jan 27, 2021
@AndreMouche
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 27, 2021
@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 22153
  • 22539
  • 22555

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@disksing merge failed.

@disksing
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 22520

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@disksing merge failed.

@disksing
Copy link
Contributor Author

/merge

3 similar comments
@disksing
Copy link
Contributor Author

/merge

@disksing
Copy link
Contributor Author

/merge

@disksing
Copy link
Contributor Author

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@disksing merge failed.

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 415d14b into pingcap:master Jan 27, 2021
@disksing disksing deleted the fastrand branch January 27, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/store status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants